home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 2 / United Public Domain Gold 2.iso / utilities / pu328.dms / pu328.adf / Aprf / APrf.doc.pp / APrf.doc
Text File  |  1992-11-02  |  32KB  |  922 lines

  1.  
  2.             APrf v5.00 - User's Guide
  3.  
  4.  
  5.  
  6.  
  7.  
  8.     This file describes release 5.00 of the utility APrf. This program
  9. is public domain, and permission is granted to freely distribute and  copy
  10. it, provided no charge or fee is ask for, and no modification is  done    to
  11. this package.
  12.  
  13.     APrf is copyright (c)1989-1990-1991-1992 by Denis  GOUNELLE,   any
  14. commercial usage or selling of this program, without  written  permission,
  15. is ABSOLUTLY FORBIDEN. By mutual agreement, Serge HAMMOUCHE is    authorized
  16. to distribute APrf as he likes.
  17.  
  18.     "PowerPacker 2.3b" is (c)1989  by  PowerPeak  and  Nico  FRANCOIS.
  19. "PowerPacker Pro 3.0b" is  (c)1990 by  PowerPeak  and  UGA  SoftWare.  The
  20. "powerpacker.library" library  is  (c)1990  by  Nico  FRANCOIS.  AREXX  is
  21. (c)1987 by William Hawes.
  22.  
  23.      No warranty is made that there's no errors in APrf. YOU USE  THIS
  24. PROGRAM AT YOUR OWN RISKS. In no event will I be liable  for  any  damage,
  25. direct or indirect, resulting of the use of APrf.
  26.  
  27.  
  28. Table of contents:
  29. ------------------
  30.  
  31.     1. Introduction.
  32.     2. User's guide
  33.        2.1 Running APrf from the CLI.
  34.        2.2 Running APrf from WorkBench.
  35.        2.3 Getting started.
  36.        2.4 Gadgets.
  37.        2.5 Menus.
  38.        2.6 Header and footer.
  39.        2.7 The preview function.
  40.        2.8 Modifying page selection.
  41.     3. Advanced concepts.
  42.        3.1 Using "powerpacker.library".
  43.        3.2 The "eXpress" mode.
  44.        3.3 The AREXX mode.
  45.        3.4 The "APrf.Init" file.
  46.     4. Memory management
  47.        4.1 The file to print.
  48.        4.2 The output buffer.
  49.        4.3 Memory requirements.
  50.     5. Miscellaneous.
  51.  
  52.  
  53. 1. Introduction.
  54. ----------------
  55.  
  56.     APrf is a text file printing utility, developped  for  the  Amiga.
  57. This program allows to add an header or a footer in  a    page,  to  set    up
  58. margins, to have a multi-columns output, etc... and uses your  Preferences
  59. settings. It also have an AREXX-compatible  message  port,  and  can  load
  60. files compressed with "PowerPacker 2.3b" or "PowerPacker Pro 3.0b".
  61.  
  62.     You can send me your suggestions and criticism writing to:
  63.  
  64.               M. GOUNELLE Denis
  65.                   Boite  71
  66.              6, rue des cailloux
  67.             92110 CLICHY - FRANCE
  68.  
  69.     Many thanks to Jean-Yves PROUX, Michel    SCHINZ,  Serge    HAMMOUCHE,
  70. Pierre VITET, and Jean ROUGELIN for tests and ideas.
  71.  
  72.  
  73. 2. User's guide.
  74. ----------------
  75.  
  76.     APrf can be run from Workbench or from the CLI. If  you  run  APrf
  77. from the CLI, I suggest to launch it  with  a  "RunBackGround"  or  "ARun"
  78. command to detach it from CLI. To my mind, the best thing to do it  is    to
  79. define an alias in your "S:Shell-Startup" file, like this:
  80.  
  81.         Alias APrf C:RunBackGround SYS:Utilities/APrf []
  82.  
  83.  
  84.     2.1 Running APrf from the CLI.
  85.     ------------------------------
  86.  
  87.     From the CLI, APrf is invoked using some arguments to  modify  the
  88. default options. The command line is of the form:
  89.  
  90.     APrf [filename][-c#][-f#][-l#][-n#][-oF][-p#][-r#][-s#][-t#]
  91.          [-x#][-A][-Cseq][-D#][-F{L|C|R}fmt][-H{L|C|R}fmt][-N#]
  92.          [-Oopts][-P{p|e|f}][-Spages][-X]
  93.  
  94.     If you specify the filename argument, the corresponding file  will
  95. be taken as  the  file    to  print.  Here's  a  description  of  the  other
  96. arguments:
  97.  
  98.     -c#    (Columns number)
  99.         Prints file in # columns.
  100.         Default value: # = 1
  101.         Minimal value: # = 1. Maximal value: # = 999.
  102.  
  103.     -f#    (page Format)
  104.         Selects page format. # can be one of:
  105.  
  106.             0 : nothing
  107.             1 : header
  108.             2 : footer
  109.             3 : both header and footer
  110.  
  111.         Default value: # = 1.
  112.         See section 2.6 for more information.
  113.  
  114.     -l#    (Left margin)
  115.         Sets a left margin of #  characters.  Note  that  the
  116.         margins set up in Preferences is ALWAYS used.
  117.         Default value: # = 0
  118.         Minimal value: # = 0. Maximal value: # = 999.
  119.  
  120.     -n#    (line Numbering)
  121.         Numbers lines with # digits numbers.
  122.         Default value: # = 0 (no line numbers).
  123.         Minimal value: # = 0. Maximal value: # = 10.
  124.  
  125.     -oF    (Output)
  126.         Printing will be re-directed to file F.
  127.  
  128.     -p#    (Page length)
  129.         Sets page length to # lines.
  130.         Default value: "Paper length" set up in Preferences.
  131.         Minimal value: # = 5. Maximal value: # = 999.
  132.  
  133.     -r#    (Right margin)
  134.         Sets a right margin of # characters.  Note  that  the
  135.         margins set up in Preferences is ALWAYS used.
  136.         Default value: # = 0
  137.         Minimal value: # = 0. Maximal value: # = 999.
  138.  
  139.     -s#    (column Spaging)
  140.         Columns are separated by # spaces.
  141.         Default value: # = 1
  142.         Minimal value: # = 1. Maximal value: # = 999.
  143.  
  144.     -t#    (Tabulation)
  145.         Sets tabulation stop positions to  #+1,  2#+1,    3#+1,
  146.         etc..
  147.         Default value: # = 8.
  148.         Minimal value: # = 1. Maximal value: # = 999.
  149.  
  150.     -x#    (copies)
  151.         Prints # copies of the file.
  152.         Default value: # = 1
  153.         Minimal value: # = 1. Maximal value: # = 999.
  154.  
  155.     -A    (Arexx mode)
  156.         Sets AREXX mode (see section 3.3 for more information).
  157.  
  158.     -Cseq    (Control sequence)
  159.         Selects the control sequence "seq" (see  section  3.4
  160.         for more information).
  161.  
  162.     -D#    (Date format)
  163.         Sets date format in header. # can be one of:
  164.  
  165.             0 : AmigaDOS format (dd-mmm-yy)
  166.             1 : International format (yy-mm-dd)
  167.             2 : American format (mm-dd-yy)
  168.             3 : European format (dd-mm-yy)
  169.  
  170.         Default value: # = 0.
  171.         See section 2.6 for more information.
  172.  
  173.     -F{L|C|R}fmt (Footer format)
  174.         Specifies page footer format.
  175.         See section 2.6 for more information.
  176.  
  177.     -H{L|C|R}fmt (Header format)
  178.         Specifies page header format.
  179.         See section 2.6 for more information.
  180.  
  181.     -N#    (page Numbers)
  182.         Sets first page number to #.
  183.         Default value: # = 1.
  184.         Minimal value: # = 1. Maximal value: # = 899.
  185.  
  186.     -Oopts    (Options)
  187.         Allows you to modify several options. opts can be any
  188.         combination of :
  189.  
  190.             l    letter quality
  191.             d    draft quality
  192.             8    8 LPI spacing
  193.             6    6 LPI spacing
  194.             F    fanfold paper
  195.             S    single sheet paper
  196.             t    truncate too long lines
  197.             f    control characters filter
  198.             a    ANSI sequences filter
  199.             k    output buffer size of 1 Kbytes
  200.             s    don't send "Form Feed"
  201.             u    underline header
  202.  
  203.         See the description of "Options" menu, at section 2.5, for
  204.         further informations.
  205.  
  206.     -P{p|e|f} (print Pitch)
  207.         Selects print pitch :
  208.  
  209.             -Pp    for "pica" pitch
  210.             -Pe    for "elite" pitch
  211.             -Pf    for "fine" pitch
  212.  
  213.         Default value : "Pitch" set up in Preferences.
  214.  
  215.     -Spages (Selection)
  216.         Selects the pages to print. pages can be one of :
  217.  
  218.             x      : only page x
  219.             x-y      : from page x to y
  220.             x,y,z,... : pages x,y,z,... (up to 16 pages)
  221.  
  222.         You can also use the two last forms together, as in
  223.         "-S1,3,5-8".
  224.  
  225.         CAUTION: the page numbers that you specify for page
  226.              selection must depend of  the    first  page
  227.              number (see -N option)
  228.  
  229.     -X    (eXpress)
  230.         Sets "eXpress" mode (see  section  3.2  for  further
  231.         information).
  232.  
  233.     If you make an error in your command line, a window will appear on
  234. the Workbench screen, with the message "Bad  arguments".  Click  into  the
  235. window (or press any key) to make it disappear, and correct  your  command
  236. line. Then, run APrf once more.
  237.     The "Tools" menu  has  a  command  that  gives  the  command  line
  238. corresponding to the current option settings (see section 2.5 for  further
  239. information).
  240.  
  241.  
  242.     2.2 Running APrf from Workbench.
  243.     --------------------------------
  244.  
  245.     There's three ways to run APrf from  Workbench,  if  you  want  to
  246. specify the files that hare to be printed:
  247.  
  248.      - by double-clicking on a "Project" icon  whose  "Default  tool"
  249.        is APrf
  250.      - by clicking on one or more file icons, holding down the    SHIFT
  251.        key, and double-clicking on APrf icon
  252.      - by clicking on APrf icon (and if required on some file icons),
  253.        holding down the SHIFT key, and double-clicking on a file icon
  254.  
  255.     In any case, the selected  files  are  transmitted  to    APrf.  The
  256. program will display the first filename in the "File to print" gadget (see
  257. section 2.4). The "Next file" command in the "Project" menu allows you  to
  258. skip to the next file (see section 2.5), and the "Default options" command
  259. in the "Tools" menu allows to go back to the first file in the files  list
  260. (see section 2.5).
  261.  
  262.     As when you run APrf from the CLI, you can give some arguments    to
  263. modify default options. To do this, click on a file icon and select "Info"
  264. in the "Workbench" menu (on Workbench screen). Then  click  on  the  "ADD"
  265. gadget in the "TOOL TYPES" field, and add the arguments according  to  the
  266. following syntax:
  267.  
  268.     APRF=[-c#][-f#][-l#][-n#][-oF][-p#][-r#][-s#][-t#][-x#]
  269.          [-Cseq][-D#][-F{L|C|R}fmt][-H{L|C|R}fmt][-N#]
  270.          [-Oopts][-P{p|e|f}][-Spages]
  271.  
  272.     These arguments are described in section 2.1. Please  notice  that
  273. -A (AREXX mode) and -X (eXpress mode) options can't be specified.
  274.  
  275.  
  276.     2.3 Getting started.
  277.     --------------------
  278.  
  279.     If all goes well, a new screen will  be  opened,  and  you'll  see
  280. several gadgets. Otherwise, a window will appear on Workbench screen  with
  281. a message telling you what a problem occurred. Click into the  window  (or
  282. press any key) to make it disappear, APrf stops and returns a value of    10
  283. (ERROR, see "If" command of AmigaDOS).
  284.  
  285.     APrf can return a value of 10 without displaying any  message,    in
  286. only four situations:
  287.  
  288.     a) APrf couldn't open "intuition.library"
  289.     b) APrf couldn't open "graphics.library"
  290.     c) APrf couldn't open the error window
  291.     d) APrf couldn't open the Workbench screen
  292.  
  293.     However, I don't think these things will occur very often...
  294.  
  295.     Now, I will suppose that APrf is running well. The  two  following
  296. sections are going describe the gadgets and menus  of  APrf.  If  you  are
  297. using APrf for the first time I suggest to run the program,  in  order    to
  298. understand these explanations.
  299.  
  300.  
  301.     2.4 Gadgets.
  302.     ------------
  303.  
  304.     This section describes all the gadgets displayed  on  the  screen,
  305. from the left top corner to the right bottom one:
  306.  
  307.     File to print:
  308.  
  309.         This gadget shows the name of the file to print.
  310.         To modify its value just click on it: a file requester  will
  311.         appear. If you click on the CANCEL gadget of this requester,
  312.         or on the OK gadget without giving a file name, the previous
  313.         name won't be modified.
  314.         A '*' character will appear on the right of the  file  name,
  315.         when the file is loaded in memory (see section 4.1).
  316.  
  317.     Output file:
  318.  
  319.         This gadget shows where a file will be printed.
  320.         Default value is "PRT:", but can be changed with  -o  option
  321.         (see section 2.1).
  322.         To modify its value just click on it: a file requester  will
  323.         appear. If you click on the CANCEL gadget of this  requester
  324.         the output file will become "PRT:".
  325.  
  326.     Page selection:
  327.  
  328.         This gadget shows which pages will be printed.
  329.         Default value is "*" (all the pages),  but  can  be  changed
  330.         with -S option (see section 2.1).
  331.         Please refert to section  2.8  to  see  how  to  modify  the
  332.         selection.
  333.  
  334.     The nine next gadgets allow  to  specify  respectively:  the  left
  335. margin size, the right margin size, the tabulation  size,  the    number    of
  336. lines per page, the first page number, the line numbers size,  the  number
  337. of columns, the column spacing, and the number of copies that have  to    be
  338. printed.
  339.     Each gadget shows the current value of its corresponding parameter.
  340. To increase its value click on the plus sign, and to decrease it click    on
  341. the minus sign. If a value doesn't change, you have reached the  lower  or
  342. the higher limit ! As long as you keep the left  mouse    button    down,  the
  343. value will be increased or decreased.
  344.  
  345.     Left margin: (see -l option in section 2.1)
  346.         Default value: 0
  347.         Lowest value : 0
  348.         Highest value: 999
  349.  
  350.     Right margin: (see -r option in section 2.1)
  351.         Default value: 0
  352.         Lowest value : 0
  353.         Highest value: 999
  354.  
  355.     Tabulation: (see -t option in section 2.1)
  356.         Default value: 8
  357.         Lowest value : 1
  358.         Highest value: 999
  359.  
  360.     Page length: (see -p option in section 2.1)
  361.         Default value: "Paper length" set up in Preferences
  362.         Lowest value : 5
  363.         Highest value: 999
  364.  
  365.     First page number : (see -N option in section 2.1)
  366.         Default value: 1
  367.         Lowest value : 1
  368.         Highest value: 899
  369.  
  370.         NOTE : page selection will be lost each time you
  371.                will change the first page number.
  372.  
  373.     Line numbers : (see -n option in section 2.1)
  374.         Default value: 0 (no line numbers)
  375.         Lowest value : 0 (no line numbers)
  376.         Highest value: 10
  377.  
  378.     Columns: (see -c option in section 2.1)
  379.         Default value: 1
  380.         Lowest value : 1
  381.         Highest value: 999
  382.  
  383.     Col. Spacing: (see -s option in section 2.1)
  384.         Default value: 1
  385.         Lowest value : 1
  386.         Highest value: 999
  387.  
  388.     Copies : (see -x option in section 2.1)
  389.         Default value : 1
  390.         Lowest value  : 1
  391.         Highest value : 999
  392.  
  393.     The three next gadgets are used to choose a value between severals
  394. one. Use the arrow-like gadget at the right of the value to change it.
  395.  
  396.     Page format:
  397.  
  398.         This gadget shows the selected page format (see section 2.6).
  399.         By default, the format is "header", but this can  be  changed
  400.         with -f option (see section 2.1).
  401.         To modify its value just click on it.
  402.  
  403.     Date format:
  404.  
  405.         This gadget shows the date format in the header (see  section
  406.         2.6). By default, the format is the AmigaDOS format, but this
  407.         can be changed with -D option (see section 2.1).
  408.         To modify its value just click on it.
  409.  
  410.     Print pitch:
  411.  
  412.         This gadget indicates print pitch.
  413.         Default value is taken from "Pitch" set  up  in  Preferences,
  414.         but can be changed with -P option (see section 2.1).
  415.         To modify its value just click on it.
  416.  
  417.     The next gadgets allows you to personnalize  the  header  and  the
  418. footer.
  419.  
  420.     Header:
  421.  
  422.         This gadget shows the format  of  the  three  parts  of  the
  423.         header : the left part, the  central  part,  and  the  right
  424.         part.
  425.         Default value of each part can be  changed    with  -H  option
  426.         (see section 2.1).
  427.         To modify the value of any part just click on it : a  window
  428.         with a string gadget will appear.  Press  Amiga-X  to  erase
  429.         current value, RETURN to validate, or click  on  the  window
  430.         close gadget to abort.
  431.         For more information, see section 2.6
  432.  
  433.     Footer:
  434.  
  435.         Same as header gadgets, but for the footer.
  436.         Default value of each part can be  changed    with  -F  option
  437.         (see section 2.1).
  438.         For more information, see section 2.6
  439.  
  440.     The two diamond-shaped gadgets on the bottom of the screen  allows
  441. you to start printing (left gadget) or previewing (right  gadget)  without
  442. having to play with the menus.
  443.  
  444.  
  445.     2.5 Menus.
  446.     ----------
  447.  
  448.     APrf has three    menus:    "Project",  "Tools"  and  "Options".  Each
  449. command can be selected by mouse or by a keyboard shortcut, but  "Options"
  450. menu items must be  selected  by  mouse.  Here    are  the  options  of  the
  451. Project" menu:
  452.  
  453.     "Next file" command (Amiga-N):
  454.  
  455.         If you have run APrf from Workbench and selected several
  456.         icons, this command allows you to skip to the next  file
  457.         in the list of selected files.
  458.         The "File to print" gadget is updated (see section 2.4),
  459.         and the old file is removed from memory (if it had  been
  460.         loaded, see section 4.1).
  461.  
  462.     "Print" command (Amiga-P):
  463.  
  464.         Start printing.
  465.  
  466.     "AREXX mode" command (Amiga-A):
  467.  
  468.         APrf goes in AREXX mode (see below section 3.3).
  469.         A requester will apear: click on "YES" (or press RETURN)
  470.         to confirm, or click on "NO" (or press ESCAPE) to abort.
  471.  
  472.     "About..." command (Amiga-?):
  473.  
  474.         Displays some informations about APrf.
  475.         To close the window, click inside it or press any key.
  476.  
  477.     "Iconify" command (Amiga-I):
  478.  
  479.         APrf goes sleeping, freeing  at  least    32  Kb    of  CHIP
  480.         memory and some other workspace  (the  current  file  is
  481.         removed from memory if it had been loaded).  The  screen
  482.         is closed and a  small    window    (which  title  is  "APrf
  483.         v5.00") will appear  on  the  top  left  corner  of  the
  484.         Workbench's screen.
  485.         To awake APrf, you must activate this window  and  click
  486.         then on the right mouse button.
  487.         You can quit APrf without having to awake it by clicking
  488.         on the close gadget of the small window.
  489.  
  490.     "Quit" command (Amiga-Q or ESCAPE):
  491.  
  492.         Quit APrf.
  493.         A requester will apear: click on "YES" (or press RETURN)
  494.         to confirm, or click on "NO" (or press ESCAPE) to abort.
  495.  
  496.  
  497.     Here are the commands of the "Tools" menu:
  498.  
  499.     "Default Options" command (Amiga-D):
  500.  
  501.         Restores the default options (first it loads Preferences
  502.         then it scans the command line).
  503.         If you have run APrf from Workbench and selected several
  504.         icons, the first file of the list becomes the file  that
  505.         will be printed.
  506.         This command may be useful, for example, if  you  modify
  507.         the Preferences settings and want APrf to know about it,
  508.         without having to quit the program.
  509.  
  510.     "Load file" command (Amiga-L):
  511.  
  512.         Loads immediately the file to print in    memory.  If  the
  513.         file was already in memory, yet this command  reload  it
  514.         (see section 4.1).
  515.  
  516.     "Unload file" command (Amiga-U):
  517.  
  518.         Removes the file to print from memory.
  519.         (see section 4.1).
  520.  
  521.     "Preview" command (Amiga-V):
  522.  
  523.         Activates the preview function (see section 2.7).
  524.  
  525.     "Command line" command (Amiga-K):
  526.  
  527.         Displays the argument list that  you  have  to    give  in
  528.         order to make the current  options  beeing  the  default
  529.         options.
  530.         To close the window, click inside it or press any key.
  531.  
  532.     "Doc Info" command (Amiga-X):
  533.  
  534.         Displays the page, line  and  character  counts  of  the
  535.         output file. Please notice that the character count will
  536.         always be an approximation.
  537.         To close the window, click inside it or press any key.
  538.  
  539.  
  540.     Here are the items of the "Options" menu:
  541.  
  542.     "Letter" item:
  543.  
  544.         Selects the printing quality: "letter" or "draft".
  545.         Default value is taken from "Print Quality"  set  up  in
  546.         Preferences, but can be  changed  with    -O  option  (see
  547.         section 2.1).
  548.  
  549.     "8 LPI" item:
  550.  
  551.         Selects line spacing: "8LPI" or "6PLI"
  552.         Default  value    is  taken  from  "Spacing"  set  up   in
  553.         Preferences, but can be  changed  with    -O  option  (see
  554.         section 2.1).
  555.  
  556.     "Fanfold" item:
  557.         Selects paper type: "fanfold" or "single"
  558.         Default  value    is  taken  from  "Pitch"   set   up   in
  559.         Preferences, but can be  changed  with    -O  option  (see
  560.         section 2.1).
  561.  
  562.     "Truncate" item:
  563.  
  564.         If active, too long lines are truncated instead of being
  565.         wrapped on several lines.
  566.         By default, it is not active, but this    can  be  changed
  567.         with -O option (see section 2.1).
  568.  
  569.     "CTRL filter" item:
  570.  
  571.         If active, the control characters (ASCII code lower than
  572.         32 or greated than 126) found in the file to  print  are
  573.         not send to the printer.
  574.         By default, it is not active, but this    can  be  changed
  575.         with -O option (see section 2.1).
  576.  
  577.     "ANSI filter" item:
  578.  
  579.         If active, the ANSI sequences  described  in  section  6
  580.         are not send to the printer.
  581.         By default, it is not active, but this    can  be  changed
  582.         with -O option (see section 2.1).
  583.  
  584.     "Buffer 1Kb" item:
  585.  
  586.         If active, the output buffer size will be 1 Kb    (instead
  587.         of one page)
  588.         By default, it is not active, but this    can  be  changed
  589.         with -O option (see section 2.1).
  590.         See section 4.2 for more information.
  591.  
  592.     "Send FF" item:
  593.  
  594.         If active, a "Form Feed" character is send each time the
  595.         bottom of the page is reached.
  596.         By default, it is active, but this can be  changed  with
  597.         -O option (see section 2.1).
  598.  
  599.     "Underline hdr" item:
  600.  
  601.         If active, the header will be underlined.
  602.         By default, it is not active, but this    can  be  changed
  603.         with -O option (see section 2.1).
  604.  
  605.  
  606.     2.6 Header and footer.
  607.     ----------------------
  608.  
  609.     APrf can add a header, a footer, or both, on your documents. The
  610. choice can be made when calling APrf (-f option, see section 2.1) or with
  611. the "Page format" gadget (see section 2.4). A header or a footer takes to
  612. line on the page.
  613.  
  614.     When you ask for a header (and/or a footer) format, APrf uses  the
  615. values of the "Header" (and/or "Footer")  gadgets  to  build  this  header
  616. (and/or footer). The left gadget shows what  will  be  on  the  left,  the
  617. central gadget what will be centered, and the right gadget what will be on
  618. the right. Format specifications can include the following sequences :
  619.  
  620.     %a    name of the day (e.g. "Monday")
  621.     %b    name of the month (full, e.g. "September")
  622.     %B    name of the month (short, e.g. "Sep")
  623.     %d    day of the month (01 to 31)
  624.     %D    date as shown by the "Date format" gadget
  625.     %f    basename of the file (e.g. "foo")
  626.     %F    full name of the file (e.g. "RAM:Test/foo")
  627.     %h    hour (00 to 11)
  628.     %H    hour (00 to 23)
  629.     %m    month of the year (01 to 12)
  630.     %M    minutes (00 to 59)
  631.     %n    page number
  632.     %p    period of the day (AM or PM)
  633.     %s    file size in bytes
  634.     %S    seconds (00 to 59)
  635.     %v    program release (e.g. "APrf v4.10")
  636.     %w    day of the week (0 to 6)
  637.     %x    copy number
  638.     %y    year of the century (00 to 99)
  639.     %%    % (not guaranted to always work...)
  640.  
  641.     Default value for header is "%f" for the left part, "Page %n"  for
  642. the central part, and "%D" for the right part. Default value for footer is
  643. "Page %n" for the central part, and nothing for the other parts.
  644.     You can also specify your own header (and/or  footer)  format,  by
  645. clicking on the gadget corresponding to the part you want  to  modify,    or
  646. (when starting APrf) with -H (and/or -F)  option  :  "-HLformat"  modifies
  647. left  part  of    the  header,   "-HCformat"  modifies  central  part,   and
  648. "-HRformat" modifies right part.
  649.  
  650.  
  651.     2.7 The preview function.
  652.     -------------------------
  653.  
  654.     This function allows you to see how will look the final aspect    of
  655. a text, depending upon the current option settings. To use it,    first  set
  656. up your printing settings, then choose    the  "Preview"  command  from  the
  657. "Tools" menu. A window will appear in the middle of your screen, and shows
  658. how will look the first selected page (window size is shaped by  the  page
  659. size).
  660.     To look the next page, click inside the window or press RETURN. To
  661. stop, click on the window's close gadget or press ESCAPE.
  662.     Please notice that APrf won't be able to open the  preview  window
  663. if page length value is very high : highest value for page  length  is    93
  664. lines in NTSC mode (122 in PAL mode).
  665.  
  666.  
  667.     2.8 Modifying page selection.
  668.     -----------------------------
  669.  
  670.     To modify page selection, click on the "Selected pages" gadget:  a
  671. window will appear in the midle of the screen, showing    a  grid  with  one
  672. hundred numbers, each number corresponding to a page number. These numbers
  673. are written on a white background if the corresponding page  is  selected,
  674. or on a blue background if not.
  675.     If you click on a number, you will change the  selection  for  the
  676. corresponding page. You can also use the following gadgets:
  677.  
  678.     ALL      select all pages
  679.     INVERT      reverse selection
  680.     NONE      no page selected
  681.     OK      accept new selection (or RETURN)
  682.     UNDO      undo all changes (takes back old selection)
  683.     CANCEL      abort modification (or ESCAPE)
  684.  
  685.     There's also a string gadget, in which you can enter  a  selection
  686. specification. This new selection will be added to the current one. Licits
  687. values for the string are:
  688.  
  689.     *      all the pages
  690.     x      page x only
  691.     x-y      from page x to y
  692.     x,y,z,... pages x,y,z,...
  693.  
  694.     You can also use the two last forms together, e.g. "1,3,5-8".
  695.  
  696.     Don't forget that page selection depends of the first page number,
  697. and that you won't be allowed to enter an empty selection (that  is,  with
  698. no page selected).
  699.  
  700.  
  701. 3. Advanced concepts.
  702. ---------------------
  703.  
  704.     This section deals with  some  powerful  features  of  APrf,  that
  705. allows it to be fully integrated in your working environment.
  706.  
  707.  
  708.     3.1 Using "powerpacker.library".
  709.     --------------------------------
  710.  
  711.     APrf can use "powerpacker.library" according you have installed it
  712. in the "LIBS:" directory of your hard disk or Workbench disk. This  allows
  713. you to print any files compressed with "PowerPacker 2.3b" or  "PowerPacker
  714. Pro 3.0b": the file will be decompressed automatically at loading. If data
  715. file has been encrypted, APrf will ask for a password.
  716.  
  717.  
  718.     3.2 The "eXpress" mode.
  719.     -----------------------
  720.  
  721.     It can happen that you want to print a file quickly, without using
  722. the Intuition interface (if your Preferences are correctly set, it  should
  723. be frequent).
  724.     If you specify -X option when calling APrf, once the command  line
  725. has been parsed, printing starts immediatly. APrf doesn't open any screen,
  726. and stops when printing is done. Error messages are displayed in a special
  727. window, on WorkBench's screen.
  728.  
  729.  
  730.     3.3 The AREXX mode.
  731.     -------------------
  732.  
  733.     If you specify -A option when calling APrf, it will  go  in  AREXX
  734. mode: an AREXX-compatible port (named "APrf_rexx") will be  open  and  the
  735. program will wait for messages on this port. This option  make    also  APrf
  736. go in "eXpress" mode, as if -X option was specified (see section 3.2).
  737.  
  738.     The valid messages are :
  739.  
  740.     quit    : APrf closes the message port and terminates.
  741.     wakeup    : APrf closes the message port and open its screen.
  742.     reset    : APrf loads Preferences and sets all options to their
  743.           default values
  744.     load    : APrf loads the file to print
  745.     print    : APrf starts printing
  746.  
  747.     Any other message will be considered as a command line, and scaned
  748. as described in section 2.1. If any error  occurs,  APrf  will    display  a
  749. message on the WorkBench's screen, and terminates.
  750.     If you send a "load" message and APrf don't know which file is  to
  751. load, your command won't have any effect.
  752.  
  753.     Here is an exemple of AREXX program, which print  the  "S:Startup-
  754. Sequence" file with a left margin of 10 characters, and terminates APrf :
  755.  
  756.     /* Print S:Startup-Sequence */
  757.     address "APrf_rexx"
  758.     "S:Startup-Sequence -l10"
  759.     "print"
  760.     "quit"
  761.  
  762.     Please note the " characters arround commands !
  763.  
  764.     From the Intuition interface you can go in AREXX mode by selecting
  765. the "AREXX mode" command in the "Project" menu (see section 2.5).
  766.  
  767.  
  768.     3.4 The "APrf.Init" file.
  769.     -------------------------
  770.  
  771.     When starting, APrf tries to load the "S:APrf.Init" file. If it can
  772. be loaded, the eight first lines of the file are used to build a new  menu:
  773. the "Control" menu. The format of the lines MUST be :
  774.  
  775.     name:options:sequence
  776.  
  777. where "name" and "options" are strings of characteres ("name" shouldn't be
  778. longer than 8 characters), and "sequence" is a list of decimal codes
  779. separated by spaces. Here are two examples of lines :
  780.  
  781.     my8lpi:-p90 -O8:
  782.     landscap:-p80:27 48 108 72
  783.  
  784.     Each name you gave will appear in this new "Control" menu.  If  you
  785. select one of these names, the "options" string will immediatly  be  parsed
  786. as a CLI command line. Also, at printing time, the characters  whose  ASCII
  787. code is given in the corresponding sequence will be  send  to  the  printer
  788. (after the initialisation sequences, but before the text itself).
  789.     You can select several names at the same time. Take notice that the
  790. sequences will be written with a PRD_RAWWRITE command,    so  they  won't  be
  791. interpreted by the printer device.
  792.  
  793.     The "S:APrf.Init" file will be loaded again (and the "Control" menu
  794. be updated) each time you select  the  "Default  options"  command  in  the
  795. "Tools" menu.
  796.     When calling APrf from the CLI or from the WorkBench, the -C option
  797. allows you to select a sequence at startup time. The "option"  string  will
  798. be parsed after the other calling options. If the sequence you specified in
  799. the -C option doesn't exist, the option will be ignored.
  800.     In "eXpress" mode (see section 3.2), the file "S:APrf.Init" will be
  801. loaded only if required (i.e. if you specified a -C option).
  802.  
  803.  
  804. 4. Memory management.
  805. ---------------------
  806.  
  807.     This section describes how APrf manages the memory space.
  808.  
  809.  
  810.     4.1 The file to print.
  811.     ----------------------
  812.  
  813.     Before printing or previewing a file, APrf  loads  it  in  memory.
  814. Once the file has been printed or previewed,  it  is  kept  in    memory    in
  815. prevision of another print or preview operation. The  great  advantage    is
  816. that APrf has not to load a file each time you ask for previewing  it,    or
  817. when you ask for printing it after a preview.
  818.  
  819.     A file is removed automatically from memory either if you  iconify
  820. APrf (see section 2.5), or if  you  choose  to  print  another  file  (see
  821. section 2.4), or if you select the "Next file" command from the  "Project"
  822. menu (see section 2.5). It can be removed too  (but  not  always)  if  you
  823. select the "Default options" command from the "Tools" menu.
  824.  
  825.     In addition,  the  "Load  file"  command  from  the  "Tools"  menu
  826. enforces APrf to load a file (this will be reloaded even if it was already
  827. in memory), while the "Unload file" command in the "Tools" menu makes APrf
  828. to unload a file from memory.
  829.  
  830.     Now, to let you know if a file is or isn't loaded in memory,  APrf
  831. displays a "*" character on the right of the file name when this  file  is
  832. actually loaded in memory.
  833.  
  834.     This behaviour can present two inconvenients.
  835.  
  836.     First of all, a file occupies memory even if  you  don't  need  it
  837. anymore. A solution is to iconify APrf (see section 2.5) or to select  the
  838. "Unload file" command from the "Tools" menu.
  839.  
  840.     The second inconvenient is that if you modify a file on your disk,
  841. any changes will be ignored (because APrf won't load this file again). The
  842. solution is here to select the "Load file" command from the "Tools" menu.
  843.  
  844.  
  845.     4.2 The output buffer.
  846.     ----------------------
  847.  
  848.     APrf uses an output buffer in order to make less "write" commands.
  849. With a 1 Kb buffer, printing to a file is twice faster than with the first
  850. releases of APrf whose buffer contained only one line. Even if printing to
  851. printer doesn't seem to be faster,  the  number  of  "write"  commands  is
  852. divided at least by 5 (at most by 14 or 15). Tests have shown that  system
  853. charge was greatly reduced, and though that  THE  OTHER  TASKS    WERE  LESS
  854. SLOWED DOWN.
  855.  
  856.     By default, APrf uses an output buffer of one  page  (see  section
  857. 2.5, "Buffer" option from the "Options" menu). When you change  your  page
  858. size, the output buffer is automatically re-allocated in order to store  a
  859. whole page. If there's not enough memory to allocate this one page buffer,
  860. APrf will try to allocate a 1 Kbytes buffer (a  message  will  inform  you
  861. about this). If there's still not enough memory, APrf will  stop  with  an
  862. error message "Not enough memory".
  863.  
  864.  
  865.     4.3. Memory requirements.
  866.     -------------------------
  867.  
  868.     When you run APrf, you need a bit more than 100 Kbytes    of  memory
  869. for code, data and Intuition interface. Any operation on the file to print
  870. (printing, previewing, etc...) will  cause  this  file  to  be  load  into
  871. memory, and a working buffer of (PageLength  *  LineLength)  bytes  to  be
  872. allocated. Printing will also require an output buffer of one page, or one
  873. Kbytes.
  874.  
  875.  
  876. 5. Miscellaneous.
  877. -----------------
  878.  
  879.     This section is a bric-a-brac of  some    informations  that  didn't
  880. find a place in previous sections. It deals with  some    importants  points
  881. concerning how APrf works. I strongly advise you to read it once at  least
  882. and to remind to read it again if you think APrf is working oddly.
  883.  
  884.     If "Fanfold" option is not activated, here  is  the  behaviour  of
  885. APrf: before printing a page, the program displays a requester asking  you
  886. to insert a new sheet of paper in your printer. When you're  ready,  click
  887. on "YES" (or press RETURN) to print the page. If you  click  on  "NO"  (or
  888. press ESCAPE) printing will be aborted.
  889.  
  890.     You can abort printing at any time, by clicking in the    box  where
  891. the current copy and page numbers are displayed. A requester will  appear,
  892. asking you confirmation: click on "YES" (or press RETURN) to stop printing
  893. and click on "NO" (or press ESCAPE) to resume printing.
  894.     If you abort printing, APrf will immediatly stop to send  data    to
  895. the printer, and wait for the last write request to be finished (this  can
  896. be quite long !).
  897.  
  898.     To make your files have a better  looking,  you  can  include  the
  899. following ANSI sequences:
  900.  
  901.         ESC[0m        Normal character set
  902.         ESC[3m        Italics on
  903.         ESC[23m     Italics off
  904.         ESC[4m        Underline on
  905.         ESC[24m     Underline off
  906.         ESC[1m        Boldface on
  907.         ESC[22m     Boldface off
  908.         ESC[1"z         Draft quality
  909.         ESC[2"z         NLQ quality
  910.  
  911.     All these  sequences  will  be    sent  to  your    printer,  but  the
  912. characters that compose them will neither be retained,    nor  be  displayed
  913. when APrf is in preview mode. Any other sequences will be  not    recognized
  914. and will be considered as part of text to be printed. You can filter these
  915. sequences if you don't want them to be send to the  printer  (see  section
  916. 2.5, "ANSI filter" item in "Options" menu).
  917.     The size of these sequences is limited to 32 characters by  OUTPUT
  918. line (not input line !), i.e.  to  6  or  8  sequences,  which  should  be
  919. sufficient in most case. If there's too much sequences on an output  line,
  920. the error message "Lines too long, printing aborted" will be displayed.
  921.  
  922.